extends CanvasLayer

@onready var buttons = [
		%attack_button, 
		%magic_button, 
		%defense_button, 
		%escape_button
	]
var selected_item = ""
const CURSOR = preload("res://assets/tap.png")

func hide_buttons():
	for btn in buttons:
		btn.hide()
func show_buttons():
	for btn in buttons:
		btn.show()

func action_back():
	Input.set_custom_mouse_cursor(null)
	show_buttons()

func _ready():
	pass
		
func _input(event):
	if event is InputEventMouseButton:
		if event.button_index == MOUSE_BUTTON_RIGHT and event.pressed:
			action_back()



func _on_attack_button_pressed():
	selected_item = "attack"
	hide_buttons()
	Input.set_custom_mouse_cursor(CURSOR)
	pass # Replace with function body.


func _on_magic_button_pressed():
	selected_item = "magic"
	pass # Replace with function body.


func _on_defense_button_pressed():
	selected_item = "defense"
	pass # Replace with function body.


func _on_escape_button_pressed():
	selected_item = "escape"
	pass # Replace with function body.
